<?php

class Home_Controller extends Base_Controller {

	/*
	|--------------------------------------------------------------------------
	| The Default Controller
	|--------------------------------------------------------------------------
	|
	| Instead of using RESTful routes and anonymous functions, you might wish
	| to use controllers to organize your application API. You'll love them.
	|
	| This controller responds to URIs beginning with "home", and it also
	| serves as the default controller for the application, meaning it
	| handles requests to the root of the application.
	|
	| You can respond to GET requests to "/home/profile" like so:
	|
	|		public function action_profile()
	|		{
	|			return "This is your profile!";
	|		}
	|
	| Any extra segments are passed to the method as parameters:
	|
	|		public function action_profile($id)
	|		{
	|			return "This is the profile for user {$id}.";
	|		}
	|
	*/

	public function action_index()
	{

        // setup slider image
        $contents = glob('public/img/slider/*.jpg');
        View::share('sliderContent', $contents);

		return View::make('home.index');
	}

	public function action_gallery()
	{
		return View::make('home.gallery');
	}

	public function action_help()
	{
		return View::make('home.help');
	}

	public function action_dashboard()
	{
		return View::make('home.dashboard');
	}

    public function action_about()
    {

        return View::make('home.about', array(
            'sidenav' => array(
                array(
                    'url' => 'home',
                    'name' => 'Who We Are?',
                    'active' => true
                ),
                array(
                    'url' => 'about',
                    'name' => 'What We Doing?',
                    'active' => false
                ),
                array(
                    'url' => 'about',
                    'name' => 'Where Are We?',
                    'active' => false
                )
            )
        ));
    }



}